﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace WebApiMIT3.Test
{
    // <Author>Rainer Schmitt</Author>
    // <StudentNo>1235656</StudentNo>
    // Copyright (c) 06/04/2015 All Right Reserved
    // <Date>06/04/2015</date>
    [TestClass]
    public class TimeUtil
    {
        [TestMethod]
        public void FromLongToDateTimeAndBack()
        {
            var expected = DateTime.Now;
            long timestampInLong = WebApiMIT3.Utils.TimeUtil.FromDateTime(expected);
            DateTime actual = WebApiMIT3.Utils.TimeUtil.FromLong(timestampInLong);

            Assert.AreEqual(expected, actual);
        }
    }
}
